import Vue from 'vue'
import VueRouter from 'vue-router'

//首页
// import index from 'pages/index/index'
/*页面路由*/
import index_r from 'pages/index/routes'
import home_r from 'pages/home/routes'
let routes = [
    { 
        path: '/', 
        name: '/',
        component: () => import('pages/index/index.vue').then(e=>e.default)
    },
]

routes = routes.concat(
    index_r,
    home_r
)

//安装路由功能
Vue.use(VueRouter);
//创建 router 实例，然后传 `routes` 配置
export default new VueRouter({
  routes // （缩写）相当于 routes: routes
});